<?php
    @include_once("conn.php");
    @include_once("common.php");
    $id=$_GET["id"];
    if(!$id){
        $msg=array();
        $msg["status"]=false;
        $msg["detail"]="请输入完整参数";
        echo json_encode($msg);
    }
    $rearch="select id,name,class,chinese,math,english from `study` where id=$id";
    $reasult=mysqli_query($conn,$rearch);
    $data=mysqli_fetch_assoc($reasult);
    $obj=array();
    if($data){
        $obj["status"]=true;
        $obj["detail"]="查询成功";
        $obj["data"]=$data;
    }else{
        $obj["status"]=false;
        $obj["detail"]="未找到数据";
        $obj["sql"]=$rearch;
    }
    echo json_encode($obj);


?>